package com.famnote.randomchat;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;


public class SplashScreen extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash_screen);
		
		Thread splashThread = new Thread() {
	         @Override
	         public void run() {
	            try {
	               int waited = 0;
	               while (waited < 2000) {
	                  sleep(100);
	                  waited += 100;
	               }
	            } catch (InterruptedException e) {
	               // do nothing
	            } finally {
	               finish();
	               //Intent i = new Intent();
	               //i.setClassName("com.famnote.randomchat", "com.famnote.randomchat.Chat");
	               //i.setClassName("com.famnote.randomchat", "com.famnote.randomchat.WebViewActivity");
	               //i.setClassName("com.famnote.randomchat", "com.famnote.randomchat.MainActivity");
	               //Intent i = new Intent(getBaseContext(), MainActivity.class);
	               Intent i = new Intent(getBaseContext(), HomeActivity.class);
	               startActivity(i);
	               
	               //Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://blog.naver.com/swingfish"));
	               //startActivity(intent);
	            }
	         }
	      };
	      splashThread.start();
	}

	
	/*
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_splash_screen, menu);
		return true;
	}
	*/
	
}
